﻿<div ng-controller="msgController">
    <div class="wrapper border-bottom white-bg page-heading">
        <div class="col-lg-pull-12">
            <ol class="breadcrumb">
                <li>消息设置</li>
            </ol>
        </div>
    </div>
    <div class="row ui-box">
        <div class="col-md-8">
            <a class="btn btn-primary btn-sm" ui-sref="app.manage.msg_detail({action:'add'})"><i class="fa fa-plus"></i> 添加</a>
        </div>
        <div class="col-md-4">
            <div class="input-group">
                <input type="text" class="form-control input-sm" ng-model="name" placeholder="名称">
                <span class="input-group-btn">
                    <button class="btn btn-primary btn-sm" type="button" ng-click="search()"><i class="fa fa-search"></i> 查询</button>
                </span>
            </div>
        </div>
    </div>
    <table class="table table-hover m-t-md">
        <thead>
            <tr>
                <th width="100">名称</th>
                <th width="60">代码</th>
                <th width="150">内容</th>
                <th width="60">间隔分</th>
                <th width="50">排序</th>
                <th width="150">发送类型</th>
                <th width="50">分组</th>
                <th>备注</th>
                <th width="120">管理</th>
            </tr>
        </thead>
        <tbody>
            <tr ng-repeat="item in list">
                <td>{{item.name}}</td>
                <td>{{item.code}}</td>
                <td>{{item.content}}</td>
                <td>{{item.times}}</td>
                <td>{{item.sort}}</td>
                <td>{{get_type_name(item.send_type)}}</td>
                <td>{{item.type==1?"用户":"购物"}}</td>
                <td>{{item.remark}}</td>
                <td>
                    <a class="btn btn-primary btn-xs" ui-sref="app.manage.msg_detail({action:'edit',id:item.id})"><i class="fa fa-cog"></i> 编辑</a>
                    <a class="btn btn-primary btn-xs" ng-click="remove(x)"><i class="fa fa-trash"></i> 删除</a>
                </td>
            </tr>
        </tbody>
    </table>
</div>